from modules.admin.models.OrderItems import OrderItems
from schemas.order_items import CreateList


class OrderItemsServices:
    @staticmethod
    def create(form: CreateList,order_id:int):
        order_items=[]
        for item in form:
            order_items.append({
                **item,
                "order_id": order_id,
            })
        data = OrderItems.bulk_create(order_items)
        return data



